package com.woniuxy.project.campus.account.model.form;

public class RedisKey {
    public static String getSendRegCodeKey(String mobile) {
        return "sendregcode:code:mobile"+mobile;
    }
    public static String userResourceKey(Integer userId) {
        return "user:resource:userid"+userId;
    }
    //用于自增的key
    public static String userCodeNumKey(String mobile){
        return "user:code:mobile"+mobile;
    }
    //保存商户 申请通知
    public static String merchantApplyNoticeKey(String  userId) {
        return "merchant:apply:notice:shopId"+userId;
    }

//    public static String userCodeNum(String mobile, Integer month, Integer Date){
//        return "user:code:mobile"+mobile+":"+month+":"+Date;
//    }
//
//    //生成UserAccessToken的key
//    public static String userAccessToken(Integer userId) {
//        return "user:access:userid"+userId;
//    }
//    //生成UserRefreshToken的key
//    public static String userRefreshToken(String access) {
//        return "user:refresh:access"+access;
//    }
//    public static String accessExpire(String access) {
//        return "user:expire:"+access;
//    }
////    //用户收藏的书籍列表
//    public static String userCollect(Integer userId) {
//        return "user:collect:userid"+userId;
//    }
//    //收藏排行榜的书籍列表
//    public static String sysCollectRank() {
//        return "sys:collect:Rank";
//    }
    //用户购物车在
    public static String userCart(Integer userId) {
        return "user:cart:userid"+userId;
    }
//    //用户购物车订单详情
    public static String userCartOrder(Integer userId, Integer productId) {
        return "user:cart:order:userid"+userId+":productId"+productId;
    }
//    //注册手机号锁
//    public static String lockPhone(String mobile) {
//        return "lock:phone:mobile"+mobile;
//    }
//    //注册用户姓名锁
//    public static String lockUserName(String userName) {
//        return "lock:username:username"+userName;
//    }
    //锁商品id
    public static String lockProductId(Integer productId) {
        return "lock:productId"+productId;
    }
//
//    //锁订单号
//    public static String lockOrderNo(String orderNo) {
//        return "lock:orderNo"+orderNo;
//    }
//
    //用订单号做key 记录重试次数
    public static String orderRetryKey(String orderId) {
        return "order:retry:orderId:"+orderId;
    }



    //用来记录进入收入金额的key
        public static String userOrderMoney(String orderNumber) {
        return "income:orderNumber"+orderNumber;
        }

        //用来记录订单是否已经结算的key
        public static String orderSettlementKey(String shopId, String orderNumber){
        return  "order:settlement:shopId"+shopId+":orderNumber"+orderNumber;
        }

}
